package com.jy.api.vo.stock;

import com.jy.api.domain.StockChangeTransaction;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created by lihu on 2018/2/2.
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StockTransactionVo {

    private String productName;

    private int stockQuantityRatio;

    private int stockPrice;

    /**
     * 个
     */
    private int single = 0;

    /**
     * 件
     */
    private int whole = 0;


    public StockTransactionVo(StockChangeTransaction stockTransaction) {
        productName = stockTransaction.getSkuName();
        stockQuantityRatio = 1;
        stockPrice = 0;
        single = stockTransaction.getQuantity();
        whole = stockTransaction.getQuantity();
    }


}
